package com.lin;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
/**
 * @program: blog
 * @description: 主入口
 * @author: Lin
 * @create: 2020-04-03 12:28
 **/
@SpringBootApplication
@EnableSwagger2
@MapperScan(basePackages = {"com.lin.blog.mapper"})
public class BlogApplication {

    public static void main(String[] args) {
        //        System.out.println("===========================================");
        /**
         * Springboot整合Elasticsearch 在项目启动前设置一下的属性，防止报错
         * 解决netty冲突后初始化client时还会抛出异常
         * java.lang.IllegalStateException: availableProcessors is already set to [4], rejecting [4]
         */
        System.setProperty("es.set.netty.runtime.available.processors", "false");
        SpringApplication.run(BlogApplication.class, args);
    }

}
